package collection;

import java.util.ArrayList;
import java.util.Collection;
//contains()PAND
public class CollectionDemo2 {
    public static void main(String[] args) {
        Collection c=new ArrayList();
        c.add(new Point(1,2));
        c.add(new Point(3,4));
        c.add(new Point(4,7));
        System.out.println(c);

        Point p=new Point(4,7);
        p.setX(56);
        boolean cotains = c.contains(p);
        System.out.println("是否包含"+cotains);

        c.remove(p);
        boolean cotains2=c.contains(c);
        System.out.println("是否包含:"+cotains2);


    }
}
